package com.kt.live.controller;

import com.kt.live.Service.UserAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.awt.*;

@RestController
public class UserAccountController {
    @Autowired
    private UserAccountService userAccountService;

    @RequestMapping(value = "/user/checkUsername",method = RequestMethod.POST,produces = MediaType.APPLICATION_ATOM_XML_VALUE)
    public boolean checkUserName(String userName){
        boolean checkResult=userAccountService.checkUserName(userName);
        if (checkResult){
            return false;
        }
        return true;
    }
}
